package com.luxx.util;

/**
 * Column
 * 
 * @author luxx
 *
 */
public class Column {

	public String name;// 数据库字段名

	public int sqlType;// 数据库字段类型

	public int sqlColumnLength;// 数据库字段长度

	public int sqlDecimalLength;// 数据库小数长度

	public boolean sqlNotNull;// 是否为空

	public Class javaType;// Java类型

	public String javaName;// 字段名称

	public String sqlTypeName;

	public String defalutValue;// 默认值

	public int getSqlType() {
		return sqlType;
	}

	public void setSqlType(int sqlType) {
		this.sqlType = sqlType;
	}

	public int getSqlColumnLength() {
		return sqlColumnLength;
	}

	public void setSqlColumnLength(int sqlColumnLength) {
		this.sqlColumnLength = sqlColumnLength;
	}

	public boolean isSqlNotNull() {
		return sqlNotNull;
	}

	public void setSqlNotNull(boolean sqlNotNull) {
		this.sqlNotNull = sqlNotNull;
	}

	public Class getJavaType() {
		return javaType;
	}

	public void setJavaType(Class javaType) {
		this.javaType = javaType;
	}

	public String getJavaName() {
		return javaName;
	}

	public void setJavaName(String javaName) {
		this.javaName = javaName;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getSqlDecimalLength() {
		return sqlDecimalLength;
	}

	public void setSqlDecimalLength(int sqlDecimalLength) {
		this.sqlDecimalLength = sqlDecimalLength;
	}

	public String getSqlTypeName() {
		return sqlTypeName;
	}

	public void setSqlTypeName(String sqlTypeName) {
		this.sqlTypeName = sqlTypeName;
	}

	public String getDefalutValue() {
		return defalutValue;
	}

	public void setDefalutValue(String defalutValue) {
		this.defalutValue = defalutValue;
	}

	@Override
	public int hashCode() {
		return this.javaName != null ? javaName.hashCode() : 0;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj != null && obj instanceof Column)
			return this.javaName.equals(((Column) obj).getJavaName());
		return false;
	}

}
